import { createApp } from "vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import App from "./App.vue";
//svg插件需要配置代码
import "virtual:svg-icons-register";
//引入自定义插件对象：注册整个项目全局组件
import globalComponent from "@/components/index";
//引入模板的全局样式
import "@/style/index.scss";
//引入路由
import router from "@/router/index";
//引入仓库
import pinia from "./store";
//引入路由鉴权文件
import "./permission";
//暗黑模式需要的样式
import "element-plus/theme-chalk/dark/css-vars.css";
//引入自定义指令
import { isHasButton } from "@/directive/has";
const app = createApp(App);
//安装自定义插件
app.use(globalComponent);
//安装仓库
app.use(pinia);
//注册模板路由
app.use(router);
app.use(ElementPlus, {
  locale: zhCn,
});
isHasButton(app);
app.mount("#app");
